fix(cuDF): Fix debug build failure#17011
fix(cuDF): Fix debug build failure#17011pramodsatya wants to merge 2 commits intofacebookincubator:mainfrom
Conversation
✅ Deploy Preview for meta-velox canceled.
|
Build Impact AnalysisFull build recommended. Files outside the dependency graph changed:
These directories are not fully covered by the dependency graph. A full build is the safest option. Fast path • Graph from main@d7891436cf23f7f76322259344ed7d707b428c60 |
| auto stream = cudf::get_default_stream(); | ||
| auto mr = cudf::get_current_device_resource_ref(); | ||
| auto stream = cudf::get_default_stream(cudf::allow_default_stream); | ||
| auto mr = rmm::mr::get_current_device_resource(); |
There was a problem hiding this comment.
The API at velox/experimental/cudf/CudfNoDefaults.h says we could use get_temp_mr() instead.
@bdice can you please take a look at this fix? Thanks.
There was a problem hiding this comment.
Yes. We should use get_temp_mr(). Later this get_temp_mr() will be replaced by ops specific temporary mr to track temporary memory allocation too.
karthikeyann
left a comment
There was a problem hiding this comment.
AST and Evaluator are hard to clean up with temporary mr and stream usage because they are called in non-driver thread in driver adapter while invoking constructor of Operators. so, It was not cleaned at all.
Using get_temp_mr() is right fix for now.
816edb6 to
d406b85
Compare
|
Thanks @majetideepak, @karthikeyann, updated as suggested and verified this fixes the cuDF debug build on latest |
Problem
Build error for T = double:
makeScalarFromValue()inAstUtils.hcallscudf::get_default_stream()andcudf::get_current_device_resource_ref(). When any.cppfile includes bothCudfNoDefaults.handAstUtils.h(e.g.CudfHashJoin.cpp), these calls hit the__attribute__((error))redeclarations that guard against accidental default argument usage.In Release builds (
-O2), GCC's dead-code elimination removes unused template instantiations before the error fires. In Debug builds (-O0), all instantiations are preserved, triggering a hard compile error.Solution
Replaces the two calls with existing approved alternatives:
cudf::get_default_stream()→cudf::get_default_stream(cudf::allow_default_stream)(fromCudfDefaultStreamOverload.h)cudf::get_current_device_resource_ref()→rmm::mr::get_current_device_resource()(direct RMM call, same pattern asget_temp_mr()inCudfNoDefaults.h)Both return identical values at runtime — zero performance impact.
Changes
velox/experimental/cudf/expression/AstUtils.h: UpdatemakeScalarFromValue()to use poison-safe alternatives